import React from 'react'
import {useDispatch,useSelector} from "react-redux"
import * as action from "../action"
function Ttt(props) {
    const aaa =  useSelector((state)=>{
        console.log(state);
        return {
            ...state.hotReducer
        }
    })
    const dispatch = useDispatch();

  let changename =()=>{
    console.log(action,2222);
    dispatch(action.setName())
  }
  return (
    <div>{aaa.name}
    
        <button onClick={()=>changename()}>点击</button>
    </div>
  )
}

export default Ttt